package main

import "fmt"

type arrow struct{
	student_name string//姓名
	student_se string//性别
	student_pro string//专业
	student_class int//班级
	student_num int//学号
	student_English float64//英语成绩
	student_Math float64//高数成绩
	student_C float64//C语言成绩
	level int//用来排名
	average int//平均分
	Tnext *arrow//指针域
}


func main(){
	var a int = 0

	var prit int = 0

	stu_head := &arrow{}
	stu_head.Tnext = nil

	fmt.Printf("输入第一名学生以使用其他功能")

	stu_head = student_in(stu_head)

	for a == 0 {
		menu()
		fmt.Scanf("%d",&prit)
		if prit == 1{
			fmt.Printf("\n\n\n\n")
			student_in_add(stu_head)
		}else if prit == 2 {
			fmt.Printf("\n\n\n\n")
			student_add(stu_head)
		}else if prit == 3 {
			fmt.Printf("\n\n\n\n")
			student_fin(stu_head)
		}else if prit == 4 {
			fmt.Printf("\n\n\n\n")
			stu_head = student_del(stu_head)
		}else if prit == 5 {
			fmt.Printf("\n\n\n\n")
			student_rank(stu_head)
		}else if prit == 6 {
			fmt.Printf("\n\n\n\n")
			student_sta(stu_head)
		}else if prit == 7 {
			fmt.Printf("\n\n\n\n")
			student_in_del(stu_head)
		}else if prit == 8 {
			fmt.Printf("\n\n\n\n")
			stu_head = student_change(stu_head)
		}else if prit == 9 {
			fmt.Printf("\n\n\n\n")
			student_aver(stu_head)
		}else if prit == 10 {
			break
		}else {
			fmt.Printf("\n\n\n\n\t\t输入错误")
		}
	}

}